﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfDemo
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            //var setting = new CefSharp.Wpf.CefSettings();
            //// 设置语言
            //setting.Locale = "zh-CN";
            //CefSharp.Cef.Initialize(setting);
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var setting = new CefSharp.Wpf.CefSettings();
            // 设置语言
            setting.Locale = "zh-CN";
            
            CefSharp.Cef.Initialize(setting);
            CefSharp.Cef.EnableHighDPISupport();

            var webView = new CefSharp.Wpf.ChromiumWebBrowser();
            this.web.Content = webView;
            //webView
            //this.Content = webView;

            webView.Address = "http://www.jd.com";
        }
    }
}
